<!-- 选择本项目的开出编号 -->
<template>
  <div>
      <el-dialog   :modelValue="dialogVisible"  title="开出命令选择"  width="70%" 
                  :close-on-click-modal="false" :close-on-press-escape="false"
                  :show-close="false" >

          <ComptCtlCmd ref="ctlCmd"  />

        <template #footer>
          <div style="display: flex; flex-direction: row-reverse; ">
            <el-button @click="handleCancel">取消</el-button>
            <el-button type="primary" @click="handleOk"  style="margin: 0 10px 0 10px;" >返回开出号</el-button>
          </div>
        </template>
      </el-dialog>
  </div>
</template>

<script>

import ComptCtlCmd from "@/systemmanage/func/ComptCtlCmd.vue";

export default {
  name: "DlgSelectCmdProject",
  props:{ dialogVisible: Boolean },
  components:{ ComptCtlCmd },
  emits:[ "resSelectCmdProject" ],

  mounted() {

  },
  computed:{

  },
  data(){
    return{

    }
  },
  watch: {

  },
  methods:{
    handleOk(  ){
      console.log( "handleOk" )
      let ctlid = this.$refs.ctlCmd.getCtlId()
      if( ctlid == -1 ){
        this.$message.error("请选择一条命令")
        return
      }
      this.$emit("resSelectCmdProject",  1,  ctlid )
    },

    handleCancel(){
      console.log( "handleOk" )
      this.$emit("resSelectCmdProject", 0 )
    },

  },  // end of methods

}

</script>

<style  lang="less" scoped >


</style>